-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify RunONNXModel.py for pip install #2857
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Chen Tong <[email protected]>
Signed-off-by: Tong Chen <[email protected]>
Signed-off-by: Tong Chen <[email protected]>
Signed-off-by: chentong319 <[email protected]>
This reverts commit ebd27e2.
This reverts commit 432e4be.
Signed-off-by: chentong319 <[email protected]>
Signed-off-by: chentong319 <[email protected]>
@chentong319 Can you add a reference to the ORT interface that this PR is imitating. In your first example
was the |
Yes, onnx_model is not needed if the compiled .so is provided. By the way, the two onnxmilrrun.RunONNXModel.onnxmlirrun commands are two independent ways to do inference. |
Got it, so we can provide a onnx file or a pre-compiled binary, smart, thanks. |
if onnx_model : | ||
args.model = onnx_model | ||
if compiled_so : | ||
args.load_so = compiled_so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check if both onnx_model
and compiled_so
are not given?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, and maybe if none are given, an error?
My two cents here. For the package name (the first onnxmlirrun), just Anyway, we have several python utilities, perhaps it's time to reorganize them into a single python package. |
The goal is to create a python package so that we can run an inference like onnxruntime in python script. Since the RunONNXModel.py provides most of the necessary functionality, I added extra support in that script. The pip package related code will be checked later. I tested with a local pip install. We can upload the package later.
Major changes:
Example:
We may have different name for the functions and the package. Comments are welcome.